; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--list --split_sections --debug -c --asm --interleave -o..\out\main.o --asm_dir=.\Lst\ --list_dir=.\Lst\ --depend=..\out\main.d --cpu=Cortex-M3 --apcs=interwork -O0 --diag_suppress=9931 -I..\Libraries\inc -I..\CMSIS -I..\users -I..\Libraries\src -I..\Libraries\sys -I..\COMM -I..\MOD -I..\CAN -D__MICROLIB -D__UVISION_VERSION=525 -D_RTE_ -DSTM32F10X_HD -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER --omf_browse=..\out\main.crf ..\users\main.c]
                          THUMB

                          AREA ||i._IWDG_Init||, CODE, READONLY, ALIGN=2

                  _IWDG_Init PROC
;;;46     */
;;;47     void _IWDG_Init(void)
000000  b510              PUSH     {r4,lr}
;;;48     {
;;;49       uint32_t cnt = 0;
000002  2400              MOVS     r4,#0
;;;50       RCC_LSICmd(ENABLE);
000004  2001              MOVS     r0,#1
000006  f7fffffe          BL       RCC_LSICmd
;;;51       while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET)
00000a  e005              B        |L1.24|
                  |L1.12|
;;;52       {
;;;53         if (cnt < 1000000)
00000c  480d              LDR      r0,|L1.68|
00000e  4284              CMP      r4,r0
000010  d201              BCS      |L1.22|
;;;54           cnt ++;
000012  1c64              ADDS     r4,r4,#1
000014  e000              B        |L1.24|
                  |L1.22|
;;;55         else
;;;56           return;
;;;57       }
;;;58       IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
;;;59       IWDG_SetPrescaler(IWDG_Prescaler_32);
;;;60       IWDG_SetReload(3750); // 3s
;;;61     
;;;62       IWDG_ReloadCounter();
;;;63       IWDG_Enable();
;;;64     }
000016  bd10              POP      {r4,pc}
                  |L1.24|
000018  2061              MOVS     r0,#0x61              ;51
00001a  f7fffffe          BL       RCC_GetFlagStatus
00001e  2800              CMP      r0,#0                 ;51
000020  d0f4              BEQ      |L1.12|
000022  f2455055          MOV      r0,#0x5555            ;58
000026  f7fffffe          BL       IWDG_WriteAccessCmd
00002a  2003              MOVS     r0,#3                 ;59
00002c  f7fffffe          BL       IWDG_SetPrescaler
000030  f64060a6          MOV      r0,#0xea6             ;60
000034  f7fffffe          BL       IWDG_SetReload
000038  f7fffffe          BL       IWDG_ReloadCounter
00003c  f7fffffe          BL       IWDG_Enable
000040  bf00              NOP      
000042  e7e8              B        |L1.22|
;;;65     
                          ENDP

                  |L1.68|
                          DCD      0x000f4240

                          AREA ||i.main||, CODE, READONLY, ALIGN=2

                  main PROC
;;;68     
;;;69     int main(void)
000000  f7fffffe          BL       PLC_IO_config
;;;70     { 
;;;71     //	rstFlg = RCC->CSR;
;;;72       PLC_IO_config();		                       // PLCʼ 
;;;73     #if RTC_FUNC
;;;74       RTC_Init();                                // RTCʱ	
;;;75     #endif
;;;76     	
;;;77     	data_init();		                          //D8000~D8126ʼ
000004  f7fffffe          BL       data_init
;;;78     	PLC_ReadKeepData();                      //PLCϵݻ
000008  f7fffffe          BL       PLC_ReadKeepData
;;;79     	
;;;80       USART1_Configuration();                    //ڳʼ 	
00000c  f7fffffe          BL       USART1_Configuration
;;;81       bsp_Init();							                   //485ʼ	
000010  f7fffffe          BL       bsp_Init
;;;82     	HS_MOD_LOCAL_ADDR =1;                      //ͨŵַΪ1
000014  2001              MOVS     r0,#1
000016  490d              LDR      r1,|L2.76|
000018  f8a10ef2          STRH     r0,[r1,#0xef2]
;;;83     	HS_MOD_SAVLE_ADDR =1;                      //վͨΪ1	
00001c  f8a10ef6          STRH     r0,[r1,#0xef6]
;;;84     	
;;;85     	gCommLedFlashFlg =1;
000020  490b              LDR      r1,|L2.80|
000022  7008              STRB     r0,[r1,#0]
;;;86     	
;;;87     //CAN߹
;;;88     #if CAN_FUNC
;;;89     	can_Init();				                         //ʼSTM32 CANӲ	
;;;90     #endif 	
;;;91     #if ADC_FUNC
;;;92       ADC_init();	                               //ADCʼ	
;;;93     #endif
;;;94     	
;;;95     #if DAC_FUNC
;;;96     	DAC_out_init();
;;;97     #endif
;;;98     	/* */
;;;99     #if PWM_OUTPUT_FUNC
;;;100    	/*  */
;;;101      PWM_Y0_Restore_Config();                   //ָIOڵ
;;;102      PWM_Y1_Restore_Config();
;;;103    	PulseOutputInit();                         //ʼȫֽṹ 	
;;;104    #endif
;;;105    
;;;106    #if ENCODE_FUNC
;;;107    	/*  */
;;;108    	Cap_PulseInputInit();  // ģʽ																		 
000024  f7fffffe          BL       Cap_PulseInputInit
;;;109    	X_Io_Restore();        // IOӲλ	
000028  f7fffffe          BL       X_Io_Restore
;;;110    #endif
;;;111    	
;;;112      NVIC_Confinguration(ENABLE);               //жϳȫȼ
00002c  2001              MOVS     r0,#1
00002e  f7fffffe          BL       NVIC_Confinguration
;;;113    	_IWDG_Init();
000032  f7fffffe          BL       _IWDG_Init
;;;114    	
;;;115      while(1)                                      
000036  e008              B        |L2.74|
                  |L2.56|
;;;116      {	
;;;117    #if RTC_FUNC
;;;118         RTC_Get();		                          //ʱɨ		
;;;119    #endif
;;;120    		
;;;121    	   PLC_ProInstructParse();    	          //PLCָ	
000038  f7fffffe          BL       PLC_ProInstructParse
;;;122            		
;;;123    	  if(Send_out)
00003c  4805              LDR      r0,|L2.84|
00003e  7800              LDRB     r0,[r0,#0]  ; Send_out
000040  b108              CBZ      r0,|L2.70|
;;;124    			TX_Process();	                        //ʹ 
000042  f7fffffe          BL       TX_Process
                  |L2.70|
;;;125    
;;;126    #if CAN_FUNC
;;;127    	   CAN_Poll(); 
;;;128    #endif
;;;129    	  
;;;130    #if ADC_FUNC
;;;131    		 ADC_Sample();
;;;132    #endif
;;;133    	
;;;134    #if POWER_DOWN_WAY ==0    
;;;135    		/* ͵ѹֶϵ籣 */
;;;136    		if((!PVD) || (D8250 == 8250) || (powTest ==1))	   
;;;137    		{	
;;;138    			if(5 <(powerDownCnt ++))              //
;;;139    			{
;;;140    				powTest =0;
;;;141    				powerDownCnt =0;
;;;142    				D8250 =528;
;;;143    				plc_16BitBuf[80] = 0;               //رY0~Y17
;;;144    //				plc_16BitBuf[81] = 0;             //رY20~Y37
;;;145    				PLC_SaveKeepData(); 
;;;146    			}
;;;147    		}
;;;148    		else
;;;149    		{
;;;150    		   powerDownCnt =0;
;;;151    		}
;;;152    #endif /* #if POWER_DOWN_WAY ==0 */    
;;;153    				
;;;154        IWDG_ReloadCounter(); // ˼ǣ20170713
000046  f7fffffe          BL       IWDG_ReloadCounter
                  |L2.74|
00004a  e7f5              B        |L2.56|
;;;155      }
;;;156    }  
                          ENDP

                  |L2.76|
                          DCD      plc_16BitBuf
                  |L2.80|
                          DCD      gCommLedFlashFlg
                  |L2.84|
                          DCD      Send_out

                          AREA ||.data||, DATA, ALIGN=0

                  run_flag
000000  00                DCB      0x00
                  powTest
000001  00                DCB      0x00

                  __ARM_use_no_argv EQU 0
